//
//  SLMaskView.h
//  shunlianPower2
//
//  Created by shunlian on 2019/1/7.
//  Copyright © 2019 顺联网络. All rights reserved.
//

#import <UIKit/UIKit.h>

NS_ASSUME_NONNULL_BEGIN

@interface SLMaskView : UIView

@property (nonatomic, strong) UIControl *backgroundView;
@property (nonatomic, strong) UIView *contentView;
/**
 禁用点击背景dismiss
 */
@property (nonatomic, assign) BOOL disableBackgroundDismissAction;

- (void)contentCornerRadius:(CGFloat)cornerRadius;

/**
 show animation default is YES
 showInView default is keyWindow
 */
- (void)show;
- (void)showWithDismissBlock:(nullable dispatch_block_t)dismissBlock;
- (void)showWithAnimation:(BOOL)animation dismissBlock:(nullable dispatch_block_t)dismissBlock;
- (void)showInView:(UIView *)view animation:(BOOL)animation dismissBlock:(nullable dispatch_block_t)dismissBlock;

/**
 dissmiss animation default is YES
 */
- (void)dismiss;
- (void)dismissWithComplete:(nullable void (^)(BOOL complete))complete;
- (void)dismissWithAnimation:(BOOL)animation complete:(nullable void (^)(BOOL complete))complete;


/**
 期望的父视图,不应影响弹出登录判断

 @return view
 */
- (UIView *)expectSuperView;

/// 是否有可见的弹窗，可以判断即将弹出的弹窗会不会碰到冲突。
+ (BOOL)hasVisibleMaskView;

@end

NS_ASSUME_NONNULL_END
